package runesim.node.packethandler;
import org.apache.mina.common.IoSession;
import runesim.node.net.*;
import runesim.node.model.*;
public class SwapSlot implements PacketHandler {
				
			@Override
			@SuppressWarnings("unused")
			public void handlePacket(Packet p, IoSession session) {
				Player player = (Player) session.getAttachment();
				
                int frameID = p.readSignedWordBigEndianA(); //always 3214 in inventory
				int unknown = -(p.readByte()); //some flag, not sure but always 0
				int from = p.readSignedWordBigEndianA(); //moving from slot
				int to = p.readSignedWordBigEndian(); //moving to slot
				
				if(frameID == 3214){
					player.getInventory().swapSlot(from, to);
				}
			}
}